<template>
  <div>
    <h1>{{ person.name }}</h1>
    <h2 v-show="person.sex">性别:{{person.sex}}</h2>
    <button @click="addSex">添加sex</button>
    <br>
    姓名:
    <input  type="text" v-model="person.name">
    <h3>{{person.name2}}</h3>
  </div>
</template>

<script>
import {reactive,computed} from 'vue'

export default {
   name:'Test',
   setup() {
       let person = reactive(
           {
               name:'张三',
               age:14,
           }
       )

        person.name2 =  computed(()=>{
            return person.name + '-2'
        })
       function changeInfo() {
           console.log('111');
           
       }
       function addSex() {
           person.sex = '男'
       }

       return{
           person,
           changeInfo,
           addSex,
       }
   }
   
}
</script>

<style>
</style>


http://test5.micro-vehicle-insurance.xs.sit/template/automobileInsurance/automobile.html?orderNo=abczxz202211260467201872
http://test5.vehicle-insurance.h5.xs.sit/template/automobileInsurance/automobile.html?orderNo=abczxz202211260467201872